<html>
<head><meta charset="utf-8"><title>build *only* a cross-compiler · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/build.20*only*.20a.20cross-compiler.html">build *only* a cross-compiler</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="202890838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/build%20%2Aonly%2A%20a%20cross-compiler/near/202890838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/build.20*only*.20a.20cross-compiler.html#202890838">(Jul 04 2020 at 20:51)</a>:</h4>
<p>When I set <code>host</code>, it says it will build a compiler in addition:</p>
<div class="codehilite"><pre><span></span><code># In addition to the build triple, other triples to produce full compiler
# toolchains for. Each of these triples will be bootstrapped from the build
# triple and then will continue to bootstrap themselves. This platform must
# currently be able to run all of the triples provided here.
#
# Defaults to just the build triple
host = [&quot;aarch64-apple-darwin&quot;]
</code></pre></div>


<p>Is there a way to only build the cross-compiler?</p>
<p>/cc <span class="user-mention" data-user-id="116122">@simulacrum</span></p>



<a name="202891973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/build%20%2Aonly%2A%20a%20cross-compiler/near/202891973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/build.20*only*.20a.20cross-compiler.html#202891973">(Jul 04 2020 at 21:24)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> That would imply building those cross-compilers with the stage0 compiler, rather than the stage1, right?</p>



<a name="202892048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/build%20%2Aonly%2A%20a%20cross-compiler/near/202892048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/build.20*only*.20a.20cross-compiler.html#202892048">(Jul 04 2020 at 21:27)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> yes, which is what I’m doing now, AFAICT. I’m only building stage 1.</p>



<a name="202893075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/build%20%2Aonly%2A%20a%20cross-compiler/near/202893075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/build.20*only*.20a.20cross-compiler.html#202893075">(Jul 04 2020 at 21:56)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> I don't think you can do it "automatically" but <code>x.py build --target &lt;whatever&gt; --stage 2 src/tools/rustdoc</code> might get you pretty much what you want</p>



<a name="202893102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/build%20%2Aonly%2A%20a%20cross-compiler/near/202893102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/build.20*only*.20a.20cross-compiler.html#202893102">(Jul 04 2020 at 21:57)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="c1"># In addition to all host triples, other triples to produce the standard library</span>
<span class="c1"># for. Each host triple will be used to produce a copy of the standard library</span>
<span class="c1"># for each target triple.</span>
</code></pre></div>



<a name="202893153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/build%20%2Aonly%2A%20a%20cross-compiler/near/202893153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/build.20*only*.20a.20cross-compiler.html#202893153">(Jul 04 2020 at 21:58)</a>:</h4>
<p>or do the <code>--target</code> (and maybe <code>--host</code>) command line options replace the array, instead of extending it?</p>



<a name="202918160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/build%20%2Aonly%2A%20a%20cross-compiler/near/202918160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/build.20*only*.20a.20cross-compiler.html#202918160">(Jul 05 2020 at 11:38)</a>:</h4>
<p>Replace, I think, but not sure.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>